package menu

import (
	"bytes"
	"runtime/debug"

	"fyne.io/fyne/v2/widget"
	"github.com/gogf/gf/v2/util/gutil"
	"github.com/y2h/fyne_poem/widgets"
)

func buildinfo() {
	info, ok := debug.ReadBuildInfo()
	txt := widget.NewMultiLineEntry()
	if ok {
		bb := bytes.NewBuffer(nil)
		gutil.DumpTo(bb, info, gutil.DumpOption{})
		txt.SetText(bb.String())
		bb.Reset()
		// txt.SetText(gconv.String(info))
	}
	w := widgets.EmptyWin("Build info")
	w.SetContent(txt)
	w.Show()
}
